package subject_set.offer100;

import java.util.Arrays;

/**
 * @author haomin
 * @date 2022/10/26 18:29
 **/
public class Offer61 {
    class Solution {
        public boolean isStraight(int[] nums) {
            Arrays.sort(nums);
            int sizeZone = 0;
            for(int i = 0; i < nums.length-1; ++i){
                if(nums[i] == 0) sizeZone++;
                else if(nums[i] == nums[i+1]) return false;
            }
            return nums[4] - nums[sizeZone] < 5;
        }
    }
}